package org.jivesoftware.smackx.provider;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.jivesoftware.smack.packet.PacketExtension;
import org.jivesoftware.smack.provider.PacketExtensionProvider;
import org.jivesoftware.smack.util.PacketParserUtils;
import org.xmlpull.v1.XmlPullParser;

public abstract class EmbeddedExtensionProvider
  implements PacketExtensionProvider
{
  public final PacketExtension parseExtension(XmlPullParser paramXmlPullParser)
    throws Exception
  {
    String str1 = paramXmlPullParser.getNamespace();
    String str2 = paramXmlPullParser.getName();
    HashMap localHashMap = new HashMap();
    for (int i = 0; i < paramXmlPullParser.getAttributeCount(); i++)
      localHashMap.put(paramXmlPullParser.getAttributeName(i), paramXmlPullParser.getAttributeValue(i));
    ArrayList localArrayList = new ArrayList();
    do
    {
      int j = paramXmlPullParser.next();
      if (j == 2)
        localArrayList.add(PacketParserUtils.parsePacketExtension(paramXmlPullParser.getName(), paramXmlPullParser.getNamespace(), paramXmlPullParser));
    }
    while (!str2.equals(paramXmlPullParser.getName()));
    return createReturnExtension(str2, str1, localHashMap, localArrayList);
  }

  protected abstract PacketExtension createReturnExtension(String paramString1, String paramString2, Map<String, String> paramMap, List<? extends PacketExtension> paramList);
}

/* Location:           D:\hygieia\userclient\common\libs\easemobchat_2.1.8.jar
 * Qualified Name:     org.jivesoftware.smackx.provider.EmbeddedExtensionProvider
 * JD-Core Version:    0.6.1
 */